#include <stdio.h>
#include <stdlib.h>
#include "list.h" // 请不要删除，否则检查不通过
//删除升序链表中指定范围的结点

void lnk_del_x2y(LinkList L, ElemType mink, ElemType maxk) {
    if(L->next->data > maxk)
    return;
    LinkList right = L->next;
    LinkList left = L;
    LinkList del = NULL;
    while(right && right->data < maxk)
    {
        if(right->data <= mink)
        {
            left = right;
            right = right->next;
        }
        else
        {
            del = right;
            right = right->next;
            free(del);
            del = NULL;
        }
    }
    if(left != NULL)
    left->next = right;
}